home *** CD-ROM | disk | FTP | other *** search
/ Softdisk for Windows 42 / Softdisk for Windows 42.iso / QUARRY / QUARRY.EXE / QUARRY.dxr / 00019_SETUPBOARD.ls < prev    next >
Encoding:
Text File  |  1998-01-01  |  3.7 KB  |  137 lines

  1. on SETUPBOARD
  2.   global GRIDH, GRIDV, GRIDY, GRIDN, PUSHON, NB, NBB, CT, PL1, PL2, PL3, CTT, PL4, PL5, PL6, PC
  3.   set PUSHON to 0
  4.   set PL1 to "1001010100"
  5.   set PL2 to "0110110011"
  6.   set PL3 to "1010101010"
  7.   set PL4 to "0101001101"
  8.   set PL5 to "1001011010"
  9.   set PL6 to "0101010101"
  10.   repeat with N = 1 to 14
  11.     set CTT to N
  12.     if N = 1 then
  13.       set CT to random(6)
  14.     end if
  15.     set CT to CT + 1
  16.     if CT >= 7 then
  17.       set CT to 1
  18.     end if
  19.     if N = 1 then
  20.       set CT to 3
  21.     end if
  22.     if N = 14 then
  23.       set CT to 6
  24.     end if
  25.     if CT = 1 then
  26.       repeat with NN = 1 to 10
  27.         if char NN of PL1 = "1" then
  28.           set the locH of sprite 30 to getAt(GRIDH, N)
  29.           set the locV of sprite 30 to getAt(GRIDY, CTT)
  30.           setAt(GRIDV, CTT, 1)
  31.           updateStage()
  32.         end if
  33.         set CTT to CTT + 14
  34.       end repeat
  35.     end if
  36.     if CT = 2 then
  37.       repeat with NN = 1 to 10
  38.         if char NN of PL2 = "1" then
  39.           set the locH of sprite 30 to getAt(GRIDH, N)
  40.           set the locV of sprite 30 to getAt(GRIDY, CTT)
  41.           setAt(GRIDV, CTT, 1)
  42.           updateStage()
  43.         end if
  44.         set CTT to CTT + 14
  45.       end repeat
  46.     end if
  47.     if CT = 3 then
  48.       repeat with NN = 1 to 10
  49.         if char NN of PL3 = "1" then
  50.           set the locH of sprite 30 to getAt(GRIDH, N)
  51.           set the locV of sprite 30 to getAt(GRIDY, CTT)
  52.           setAt(GRIDV, CTT, 1)
  53.           updateStage()
  54.         end if
  55.         set CTT to CTT + 14
  56.       end repeat
  57.     end if
  58.     if CT = 4 then
  59.       repeat with NN = 1 to 10
  60.         if char NN of PL4 = "1" then
  61.           set the locH of sprite 30 to getAt(GRIDH, N)
  62.           set the locV of sprite 30 to getAt(GRIDY, CTT)
  63.           setAt(GRIDV, CTT, 1)
  64.           updateStage()
  65.         end if
  66.         set CTT to CTT + 14
  67.       end repeat
  68.     end if
  69.     if CT = 5 then
  70.       repeat with NN = 1 to 10
  71.         if char NN of PL5 = "1" then
  72.           set the locH of sprite 30 to getAt(GRIDH, N)
  73.           set the locV of sprite 30 to getAt(GRIDY, CTT)
  74.           setAt(GRIDV, CTT, 1)
  75.           updateStage()
  76.         end if
  77.         set CTT to CTT + 14
  78.       end repeat
  79.     end if
  80.     if CT = 6 then
  81.       repeat with NN = 1 to 10
  82.         if char NN of PL6 = "1" then
  83.           set the locH of sprite 30 to getAt(GRIDH, N)
  84.           set the locV of sprite 30 to getAt(GRIDY, CTT)
  85.           setAt(GRIDV, CTT, 1)
  86.           updateStage()
  87.         end if
  88.         set CTT to CTT + 14
  89.       end repeat
  90.     end if
  91.     if (N = 1) or (N = 13) then
  92.       set CT to random(4) + 1
  93.     end if
  94.   end repeat
  95.   set the locH of sprite 30 to -50
  96.   set the locV of sprite 30 to -50
  97.   set CT to 0
  98.   set the castNum of sprite 10 to 12
  99.   repeat with N = 1 to 7
  100.     set CT to 0
  101.     repeat while CT = 0
  102.       set PC to random(140)
  103.       if (getAt(GRIDV, PC) = 0) and (getAt(GRIDH, PC) < getAt(GRIDH, 4)) then
  104.         set CT to 1
  105.         set the locH of sprite 10 to getAt(GRIDH, PC)
  106.         set the locV of sprite 10 to getAt(GRIDY, PC)
  107.         setAt(GRIDV, PC, 2)
  108.         updateStage()
  109.       end if
  110.     end repeat
  111.   end repeat
  112.   set CT to 0
  113.   set the castNum of sprite 29 to 4
  114.   repeat with N = 1 to 7
  115.     set CT to 0
  116.     repeat while CT = 0
  117.       set PC to random(140)
  118.       if (getAt(GRIDV, PC) = 0) and (getAt(GRIDH, PC) > getAt(GRIDH, 11)) then
  119.         set CT to 1
  120.         set the locH of sprite 29 to getAt(GRIDH, PC)
  121.         set the locV of sprite 29 to getAt(GRIDY, PC)
  122.         setAt(GRIDV, PC, 3)
  123.         updateStage()
  124.       end if
  125.     end repeat
  126.   end repeat
  127.   set the locH of sprite 29 to -50
  128.   set the locV of sprite 29 to -50
  129.   set the locH of sprite 10 to -50
  130.   set the locV of sprite 10 to -50
  131.   set the locH of sprite 45 to 30
  132.   set the locV of sprite 45 to 391
  133.   set the locH of sprite 46 to 571
  134.   set the locV of sprite 46 to 391
  135.   updateStage()
  136. end
  137.